package com.itheima.mapper;

import com.itheima.pojo.Employee;
import com.itheima.vo.EmployeeVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * @author YangJiaHao
 */
@Mapper
public interface EmployeeMapper {

    Employee selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    void updateToken(@Param("token") String token,@Param("id") String id);

    Employee getById(String id);

    List<Employee> page(@Param("name") String name,@Param("start")Integer start,@Param("pageSize")Integer pageSize);

    Long countEmployee(@Param("name") String name);

    Integer save(Employee employee);

    Employee findByUsername(@Param("username") String username);

    Integer updateEmployee(Employee employee);
}
